package com.syz.mall.mapper;

import com.syz.mall.pojo.Collect;
import com.syz.mall.pojo.Product;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CollectMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Collect record);

    int insertSelective(Collect record);

    Collect selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Collect record);

    int updateByPrimaryKey(Collect record);

    Collect checkIfCollect(@Param("userId") Integer userId, @Param("productId")Integer productId);

    int deleteByUserIdAndProductId(@Param("userId")Integer userId,@Param("productId")Integer productId);

    List<Product> selectUserCollect(Integer userId);
}